#define _SEARCH_BINARY_TREE 0
#define _BINARY_TREE 1
#define _AVL_TREE 2
#define _AVL_TREE1 3

#define TREE_TYPE _AVL_TREE

#if TREE_TYPE == _BINARY_TREE
#include "binaryTree.h"
#elif TREE_TYPE == _SEARCH_BINARY_TREE
#include "binarySearchTree.h"
#elif TREE_TYPE == _AVL_TREE
#include "avlTree.h"
#elif TREE_TYPE == _AVL_TREE1
#include "avlTree1.h"
#endif
#include <stdlib.h>
int main()
{
#if TREE_TYPE == _BINARY_TREE
    SearchTree T = NULL;
    T = Insert(6, T);
    T = Insert(2, T);
    T = Insert(8, T);
    T = Insert(1, T);
    T = Insert(5, T);
    T = Insert(3, T);
    T = Insert(4, T);
    PrintTree(T);
    T = Delete(2, T);
    PrintTree(T);
#elif TREE_TYPE == _SEARCH_BINARY_TREE
    SearchTree T = NULL;
    T = Insert(6, T);
    T = Insert(2, T);
    T = Insert(8, T);
    T = Insert(1, T);
    T = Insert(5, T);
    T = Insert(3, T);
    T = Insert(4, T);
    PrintTree(T);
    T = Delete(2, T);
    PrintTree(T);
#elif TREE_TYPE == _AVL_TREE
    AvlTree T = NULL;
    T = Insert(4, T);
    T = Insert(2, T);
    T = Insert(1, T);
    T = Insert(3, T);
    T = Insert(6, T);
    T = Insert(5, T);
    T = Insert(7, T);
    T = Insert(16, T);
    T = Insert(15, T);
    T = Insert(14, T);
    T = Insert(13, T);
    T = Insert(12, T);
    T = Insert(11, T);
    T = Insert(10, T);
    T = Insert(8, T);
    T = Insert(9, T);
    T = Delete(8, T);
    PrintTree(T);
#elif TREE_TYPE == _AVL_TREE1
    AvlTree T = NULL;
    T = Insert(4, T);
    T = Insert(2, T);
    T = Insert(1, T);
    T = Insert(3, T);
    T = Insert(6, T);
    T = Insert(5, T);
    T = Insert(7, T);
    T = Insert(16, T);
    T = Insert(15, T);
    T = Insert(14, T);
    T = Insert(13, T);
    T = Insert(12, T);
    T = Insert(11, T);
    T = Insert(10, T);
    T = Insert(8, T);
    T = Insert(9, T);
    PrintTree(T);
#endif
}